<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Tab选项卡</title>
		<script src="js/jquery-1.11.1.js"></script>
		<style>
			#tab1{
				width: 250px;
				height: 100px;
				text-align: center;
				line-height: 100px;
				
			}
			#tab2{
				width: 250px;
				height: 100px;
				text-align: center;
				line-height: 100px;
			}
			#tab3{
				width: 250px;
				height: 100px;
				text-align: center;
				line-height: 100px;
			}
			#content{
				width: 750px;
				height: 500px;
				background-color: lightpink;
				text-align: center;
				line-height: 500px;
			}
			#tab1:hover{
				background-color: green;
			}
			#tab2:hover{
				background-color: green;
			}
			#tab3:hover{
				background-color: green;
			}
		</style>
	</head>
	<body>
		<button id="tab1">选项1</button>
		<button id="tab2">选项2</button>
		<button id="tab3">选项3</button>
		<div id="content">内容</div>
		<script>
			$("#tab1").click(function(){
				$("#content").css("background-color","red");
			});
			$("#tab1").click(function(){
				$("#tab1").css("background-color","green");
				$("#tab2").css("background-color","#efefef");
				$("#tab3").css("background-color","#efefef");
				$("#content").text("内容1");
			});
			$("#tab2").click(function(){
				$("#content").css("background-color","orange");
			});
			$("#tab2").click(function(){
				$("#tab2").css("background-color","green");
				$("#tab1").css("background-color","#efefef");
				$("#tab3").css("background-color","#efefef");
				$("#content").text("内容2");
			});
			$("#tab3").click(function(){
				$("#content").css("background-color","yellow");
			});
			$("#tab3").click(function(){
				$("#tab3").css("background-color","green");
				$("#tab2").css("background-color","#efefef");
				$("#tab1").css("background-color","#efefef");
				$("#content").text("内容3");
			});
		</script>
	</body>
</html>